package com.hycreate.platform.modules.project;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.hycreate.platform.common.persistence.Page;
import com.hycreate.platform.common.service.CrudService;
import com.hycreate.platform.common.utils.mypage.PageDemo;
import com.hycreate.platform.modules.atta.SfAttachment;
import com.hycreate.platform.modules.product.SfProduct;
import com.hycreate.platform.modules.project.SfProject;
import com.hycreate.platform.modules.project.SfProjectDao;

/**
 * 项目Service
 * @author hoader
 * @version 2017-01-09
 */
@Service
@Transactional(readOnly = true)
public class SfProjectService extends CrudService<SfProjectDao, SfProject> {

	public SfProject get(String id) {
		return super.get(id);
	}
	
	public List<SfProject> findList(SfProject sfProject) {
		return super.findList(sfProject);
	}
	
	public Page<SfProject> findPage(Page<SfProject> page, SfProject sfProject) {
		return super.findPage(page, sfProject);
	}
	
	@Transactional(readOnly = false)
	public void save(SfProject sfProject) {
		super.save(sfProject);
	}
	
	@Transactional(readOnly = false)
	public void delete(SfProject sfProject) {
		super.delete(sfProject);
	}
	
	
	public List<SfProduct>  findProductPage(String id){
		
	   return dao.findProductPage(id);
	}
	
	public List<SfAttachment> findProjctPic(String id){
		
		return dao.findProjctPic(id);
	}
	
	public  int  projectCount(SfProject sfProject){
		return dao.projectCount(sfProject);
	}
	
	public List<SfProject>  projectListPages(PageDemo pd){
		
		return dao.projectListPages(pd);
	}
	
	@Transactional(readOnly = false)
	public void batchDeletes(List delList){
		
		 dao.batchDeletes(delList);
	}
	
	
	
}